/**
 * Du an danh co shogi online duoc phat trien boi Le Thanh Nghi
 * thuoc cong ty N&N.,Inc
 */
package vn.nnn.shogi.board;

import java.awt.Dimension;
import java.awt.Point;
import java.awt.Rectangle;

/**
 * @author nghilt
 * 2011/11/05
 */
public class HistoryButtonLayout {
	
	final int GAP = 11;
	final int BUTTON_NUM = 7;
	
	private Rectangle[] buttonBounds;
	
	public HistoryButtonLayout( Point point ) {
		Dimension size = new Dimension( 60, 25 );
		
		buttonBounds = new Rectangle[BUTTON_NUM];
		
		for( int i = 0; i < BUTTON_NUM; i++ ) {
			buttonBounds[i] = new Rectangle( point, size );
			point = new Point( point.x + size.width + GAP, point.y );
		}
	}
	
	public HistoryButtonLayout( int x, int y ) {
		this( new Point( x, y ) );
	}
	
	public Rectangle getBeginBtBound() {
		return buttonBounds[0];
	}
	
	public Rectangle getPreviousBtBound() {
		return buttonBounds[1];
	}
	
	public Rectangle getNextBtBound() {
		return buttonBounds[2];
	}
	
	public Rectangle getCurrentBtBound() {
		return buttonBounds[3];
	}
	
	public Rectangle getBt1Bound() {
		buttonBounds[4].width *= 2; 
		return buttonBounds[4];
	}
	
	public Rectangle getBt2Bound() {
		return buttonBounds[5];
	}
	
	public Rectangle getBt3Bound() {
		return buttonBounds[6];
	}
}
